#include<stdio.h>
#include"field.h"

int main(){
	Field game;

	pos from, to;
	int x,y;

	while(1){
		game.draw();
		do{
			printf("from_x= "); scanf("%d",&x);
			printf("from_y= "); scanf("%d",&y);
			from.x = x; from.y = y;
			printf("to_x= "); scanf("%d",&x);
			printf("to_y= "); scanf("%d",&y);
			to.x = x; to.y = y;
		}while(game.move(from, to) == false);
	}
/*
	game.draw();
	pos from, to;
	from.x = from.y = 1;
	to.x = 1; to.y = 3;

	game.move(from, to);

	to.x = from.x = 2;
	from.y = 6;
	to.y = 4;

	game.move(from, to);
	game.draw();

	from.x = 4;
	from.y = 7;
	to.x = 1;
	to.y = 4;
	game.move(from, to);
	game.draw();
	printf((game.is_check(false))? "Yes": "No");
*/
	return 0;
}
